
Page({
  data: {
    imgUrls: [
      //'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
      //'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
      'http://pic.qiantucdn.com/58pic/12/64/87/39458PICwAB.jpg!/fw/780/watermark/url/L3dhdGVybWFyay12MS4zLnBuZw==/align/center'
    ],
    indicatorDots: true,
    autoplay: false,
    interval: 5000,
    duration: 1000
  },
  changeIndicatorDots: function(e) {
    this.setData({
      indicatorDots: !this.data.indicatorDots
    })
  },
  changeAutoplay: function(e) {
    this.setData({
      autoplay: !this.data.autoplay
    })
  },
  intervalChange: function(e) {
    this.setData({
      interval: e.detail.value
    })
  },
  durationChange: function(e) {
    this.setData({
      duration: e.detail.value
    })
  },
  onLoad:function(options){
    // 页面初始化 options为页面跳转所带来的参数
  },
  onReady:function(){
    // 页面渲染完成
  },
  onShow:function(){
    // 页面显示
  },
  onHide:function(){
    // 页面隐藏
  },
  onUnload:function(){
    // 页面关闭
  },
  clickImg: function(event) {
    wx.switchTab({
      url: '/pages/MainPage/MainPage',
      success: function(res){
        // success
      },
      fail: function() {
        wx.showNavigationBarLoading()
      },
      complete: function() {
        
      }
    })
  }

})